package com.baidu.mapapi;

import android.os.Bundle;

public class CoordinateConvert
{
  static Bundle a(GeoPoint paramGeoPoint, int paramInt)
  {
    Bundle localBundle = new Bundle();
    localBundle.putInt("act", 15010250);
    localBundle.putInt("x", paramGeoPoint.getLongitudeE6());
    localBundle.putInt("y", paramGeoPoint.getLatitudeE6());
    localBundle.putInt("t", paramInt);
    Mj.sendBundle(localBundle);
    int i = localBundle.getInt("x");
    int j = localBundle.getInt("y");
    String str1 = String.valueOf(c.a(String.valueOf(i).toCharArray()));
    localBundle.remove("x");
    localBundle.putString("x", str1);
    String str2 = String.valueOf(c.a(String.valueOf(j).toCharArray()));
    localBundle.remove("y");
    localBundle.putString("y", str2);
    return localBundle;
  }

  public static GeoPoint bundleDecode(Bundle paramBundle)
  {
    GeoPoint localGeoPoint = new GeoPoint(0, 0);
    String str1 = paramBundle.getString("x");
    String str2 = paramBundle.getString("y");
    String str3 = String.valueOf(c.b(str1.toCharArray()));
    String str4 = String.valueOf(c.b(str2.toCharArray()));
    int i = Integer.decode(str3).intValue();
    int j = Integer.decode(str4).intValue();
    localGeoPoint.setLongitudeE6(i);
    localGeoPoint.setLatitudeE6(j);
    return localGeoPoint;
  }

  public static Bundle fromGcjToBaidu(GeoPoint paramGeoPoint)
  {
    return a(paramGeoPoint, 2);
  }

  public static Bundle fromWgs84ToBaidu(GeoPoint paramGeoPoint)
  {
    return a(paramGeoPoint, 1);
  }
}